package com.bee.shepherd;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.otter.canal.client.kafka.KafkaCanalConnector;
import com.alibaba.otter.canal.protocol.FlatMessage;
import com.bee.shepherd.config.KafkaConfig;
import com.bee.shepherd.service.etl.IESService;
import com.bee.shepherd.service.etl.IETLService;
import com.bee.tc.common.BeeApplicationInitializer;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.retry.annotation.EnableRetry;

import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.TimeUnit;

/**
 * 主入口
 */
@SpringBootApplication
@ImportResource(locations = {"classpath:spring/dubbo.xml"})
//专门配置TC的(qmq,qscheduler),因为tc有些配置太大了,所以建议单独搞个,你也可以不要
@PropertySource(value = {"classpath:bee_tx.properties"})
@EnableAsync //激活异步注解
@EnableRetry //激活@Retry
public class CoreMainApplication extends BeeApplicationInitializer {
    private static final Logger logger = LoggerFactory.getLogger(CoreMainApplication.class);
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(CoreMainApplication.class, args);
    }

}